home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / toolpack.000 / toolpack / toolpack1.2 / scriptsource / sem.s < prev    next >
Encoding:
Text File  |  1993-10-04  |  1.9 KB  |  73 lines

  1. #! /bin/csh
  2. #  sem is a csh script to perform semantic analysis of a Fortran program
  3. #  using ISTLA.
  4. #
  5. #
  6. #  Invocation:
  7. #
  8. #  sem Fortran_source_file
  9. #
  10. #  Check command line validity.
  11. if ( $#argv == '0' ) then
  12. TOOLPACKPATH/toolpack1.2/util/echoerr \
  13. Invocation:
  14. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  15. TOOLPACKPATH/toolpack1.2/util/echoerr \
  16. sem Fortran_source_file
  17. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  18. TOOLPACKPATH/toolpack1.2/util/echoerr \
  19. Error/Warning messages sent to standard output and may be redirected to a file.
  20. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  21.    exit
  22. endif
  23. #  Check that Fortran_source_file exists.
  24. if ( -e $1 == 0 ) then
  25. TOOLPACKPATH/toolpack1.2/util/echoerr \
  26. "'$1' does not exist."
  27.    exit
  28. endif
  29. #
  30. #  Create PFS.  If PFS already exists, exit with an advisory message.
  31. #
  32. if ( -e _.TOOLPACK == 0 ) then
  33.    mkdir _.TOOLPACK
  34. else
  35. TOOLPACKPATH/toolpack1.2/util/echoerr \
  36. Toolpack-created directory '"_.TOOLPACK"' exists. \
  37. Remove with script '"discard"'.
  38.    exit
  39. endif
  40. #  Make a tab-free copy of the Fortran source and use it as source.
  41. set src = la.src$$
  42. expand $1 > _.TOOLPACK/$src
  43. #  Comment file name.
  44. set cmt = _.lacmt
  45. #  Parse tree file name.
  46. set tree = _.latree
  47. #  Symbol table file name.
  48. set symb = _.lasymb
  49. #  Comment index file name.
  50. set indx = _.laindx
  51. #  Attribute file name.
  52. set attrib = _.laattrib
  53. #  Create the interprocess file IST.CMD and append parameters for ISTLA.
  54. TOOLPACKPATH/toolpack1.2/util/mkipf \
  55. $src $cmt $tree $symb $indx $attrib
  56. #
  57. #  Invoke ISTLA.
  58. #
  59. TOOLPACKPATH/toolpack1.2/exec/istla.u
  60. #
  61. #  If tool terminated with errors, advise user to obtain listing
  62. if ( `cat _.TOOLPACK/_.info` == -1 ) then
  63. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  64. TOOLPACKPATH/toolpack1.2/util/echoerr \
  65. 'Errors detected.  Invoke script "getlst" to obtain a listing showing'
  66. TOOLPACKPATH/toolpack1.2/util/echoerr \
  67. statement and token numbers.
  68. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  69. endif
  70. #
  71. /bin/rm -r _.TOOLPACK
  72. #
  73.